-
Notifications
You must be signed in to change notification settings - Fork 760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix uv run python
when the executable has a different name
#6362
Conversation
51f700e
to
da48f30
Compare
@@ -742,6 +741,20 @@ impl RunCommand { | |||
process | |||
} | |||
Self::External(executable, args) => { | |||
// If the executable is `python` and it's not on the path, rename it to the | |||
// path reported by the interpreter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this not resolve to some Python that doesn't match the intended interpreter? Like you run uv run -p 3.9
, but we then pick up Python 3.12 that's on your path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah but what if you have a python
executable in the interpreter bin that does some special behavior? Should we unconditionally switch to the sys executable? Should we just look in the interpreter bin instead of the whole PATH here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems problematic both ways. I'm okay with unconditional replacement, I guess?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's that approach #6363
ae06205
to
2a8f458
Compare
da48f30
to
6b2dd80
Compare
No description provided.